package pers.cz.commons.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 动态数据源
 * @program: PostGirl-panent
 * @description: DynamicDataSource
 * @author: Cheng Zhi
 * @create: 2021-12-27 17:57
 **/
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        String dbKey = DbKeyHolder.getDbKey();
        return dbKey;
    }
}
